package com.nmu.app.Shrimp.veiw.javagame.render;


import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.SwingUtilities;

import com.nmu.app.Shrimp.veiw.javagame.IVisableObject;
import com.nmu.app.Shrimp.veiw.javagame.dto.Bale;

/**基础游戏框架示例
 * 
 * @author hackM
 *
 */
public class SimpleClickAndTo extends Base2DGameEngine implements Runnable{

	

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Override
	public void createAndShowGUI() {
		super.createAndShowGUI();
		//个性化初始化
		setTitle(this.getClass().getName());
		IVisableObject a=new Bale(200, 200, 50, 50);
		visableObjects.add(a);
		gameThread=new Thread(this);
		gameThread.start();
	}
	public static void main(String[] args) {
		final SimpleClickAndTo app=new SimpleClickAndTo();
		app.addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent e){
				app.onWindowClosing();
			}
		});
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				app.createAndShowGUI();
			}
		});
	
	}	
	
	
	
	
	
	
	
	
}
